package DP.factoryMethod.nvwa;

import DP.factoryMethod.nvwa.factory.AbstractHumanFactory;
import DP.factoryMethod.nvwa.factory.impl.HumanFactory;
import DP.factoryMethod.nvwa.human.impl.Chinese;
import DP.factoryMethod.nvwa.human.impl.Japanese;
import DP.factoryMethod.nvwa.human.impl.Korean;

/**
 * @author msi
 * 女娲造人的测试类
 */
public class NvWaTest {
    public static void main(String[] args) {
        AbstractHumanFactory abstractHumanFactory=new HumanFactory();
        Chinese chinese = abstractHumanFactory.createHuman(Chinese.class);
        Korean korean = abstractHumanFactory.createHuman(Korean.class);
        Japanese japanese = abstractHumanFactory.createHuman(Japanese.class);
        chinese.eat();
        chinese.talk();
        korean.eat();
        korean.talk();
        japanese.eat();
        japanese.talk();
    }
}
